<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2012.03.17.
   新鲜事内容模型($$)*/

!defined('Q_PATH') && exit;

class HomefreshcontentModel extends CommonModel{

	static public function init__(){
		return array(
			'table_name'=>'homefreshcontent',
			'check'=>array(
				'homefresh_message'=>array(
					array('require',Q::L('新鲜事内容不能为空','__APPHOME_COMMON_LANG__@Model')),
					array('max_length',100000,Q::L('新鲜事内容最大长度为100000','__APPHOME_COMMON_LANG__@Model'))
				),
			),
		);
	}

	static function F(){
		$arrArgs=func_get_args();
		return ModelMeta::instance(__CLASS__)->findByArgs($arrArgs);
	}

	static function M(){
		return ModelMeta::instance(__CLASS__);
	}

	protected function beforeSave_(){
		$this->homefresh_message=Core_Extend::replaceAttachment(C::cleanJs($this->homefresh_message));
	}

}
